#!/usr/bin/env python
# coding: utf-8

# 编写一个程序根据输入字的频率创建字典，键为单词，值为该单词出现频率。
# 
# 输入：字符串`s='New to Python or choosing between Python 2 and Python 3? Read Python 2 or Python 3.'`
# 
# 要求：打印该字典
# 
# 预期输出：`{'New': 1, 'to': 1, 'Python': 5, 'or': 2, 'choosing': 1, 'between': 1, '2': 2, 'and': 1, '3?': 1, 'Read': 1, '3.': 1}`

# In[1]:


from pprint import pprint
s='New to Python or choosing between Python 2 and Python 3? Read Python 2 or Python 3.'
p = s.split()
print({i: p.count(i) for i in p})

